home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
comm
/
www
/
IBrowseScripts.lha
/
ibrowsescripts
/
Demo
next >
Wrap
Text File
|
1980-01-14
|
3KB
|
100 lines
/* Demo
Made by Sören Forsberg : sorenf@hem1.passagen.se
*/
OPTIONS RESULTS
OPTIONS FAILAT 15
call addlib('rexxreqtools.library',0,-30)
lib= show('Libs',"rexxreqtools.library")
NL='0a'x /* newline */
ib=0 ; mi=0
open('ibstart','CON:60/100/350/80/IBStart/cds')
/* Finds out where the scripts are stached */
ADDRESS 'COMMAND' 'cd >T:progdir'
ok=open(progdirfile,'T:progdir','R')
progdir=readln(progdirfile)
close(progdirfile)
/* gets the assignlist to avoid "Cant find Volume xxx:" */
ADDRESS 'COMMAND' 'assign >T:assignlist dirs'
ok=open(assignfile,'T:assignlist','R')
alist=readch(assignfile,60000)
close(configfile)
alist=UPPER(alist)
IF POS(NL||'IBROWSE',alist)~=0 THEN ib=1
IF POS(NL||'MIAMI',alist)~=0 THEN mi=1
IF ib THEN DO
start=POS(NL||'IBROWSE',alist)+1
end=POS(NL,alist,start)
line=SUBSTR(alist,start,end-start)
oldpath=WORD(line,2)
call writeln 'ibstart','IBrowse assign found. Skipped that part'
END
IF mi THEN call writeln 'ibstart','Miami assign found. Skipped that part'
fonttag = "rt_font=" || 'topaz' || "/" || 8
title ='IBS-Demo sorenf@hem1.passagen.se 1998'
what_but ='_Run Demo|_Install|Cancel'
tags ='rt_pubscrname=IBROWSESCREEN' /* Change here the name of the screen IBROWSE runs */
noconfig_txt ="If you haven't run the installer "||NL||'NOW would be a good idea'||NL||'Select Option'
IF ~ib THEN DO
name='IBrowse'
check='IBrowse.prefs'
CALL MAKEASSIGN
END
IF ~mi THEN DO
name='Miami'
check='miami.default'
CALL MAKEASSIGN
END
call writeln 'ibstart','Rerouting assigns'
ADDRESS 'COMMAND'
'assign ibrowse: remove'
'assign ibrowse: 'progdir
'assign ibrowse: 'oldpath ' add'
IF SHOW('Ports','IBROWSE') THEN DO
ADDRESS 'IBROWSE' 'QUIT'
call writeln 'ibstart','Restarting IBrowse'
ADDRESS 'COMMAND' 'wait 5'
END
ADDRESS 'COMMAND'
'IBrowse:Ibrowse CONFIGDIR IBrowse:'
call writeln 'ibstart','Restoring assigns.'
'assign ibrowse: remove'
'assign ibrowse: 'oldpath
'wait 5'
EXIT
MAKEASSIGN:
call writeln 'ibstart','Could not find a '|| name ||' assign!!!'
call writeln 'ibstart','Please enter the path to the '|| name ||' directory'
call writeln 'ibstart','(Ex: "SYS:Surf/'|| name ||'" )'
IF name~='IBrowse' THEN call writeln 'ibstart','("Enter" / "Cancel" to skip this part. )'
call writeln 'ibstart',''
DO FOREVER
IF lib=0 THEN path=readln('ibstart')
IF lib=1 THEN path = rtfilerequest('SYS:', , "Pick "|| name ||" directory",,"rtfi_flags = freqf_nofiles")
IF path='' & name~='IBrowse' THEN BREAK
IF RIGHT(path,1)='/' THEN path=LEFT(path,(LENGTH(path)-1))
all=path||'/'|| check
If exists(all) then break
call writeln 'ibstart','Could not find '|| check ||' in'
call writeln 'ibstart',path
call writeln 'ibstart','Please enter the path to the ' name ' directory'
END
IF path~='' & name~='IBrowse' THEN DO
ADDRESS 'COMMAND'
'assign 'name':' path
END
IF path~='' & name='IBrowse' THEN oldpath=path
RETURN